home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_oth / console / console.def next >
Text File  |  1988-04-18  |  3KB  |  48 lines

  1. DEFINITION MODULE Console; (* Version 1.0 *)
  2.  
  3. (************************************************************************)
  4. (* COPYRIGHT 1988 by David Albert                                       *)
  5. (* You may use this module in any of your work and distribute it freely *)
  6. (* Provided that:    1) The copyright notice is not changed or removed  *)
  7. (*                   2) The module is not modified                      *)
  8. (*                   3) Under NO conditions is this module to be sold   *)
  9. (************************************************************************)
  10.  
  11. (* CONSOLE uses BIOS calls to provide advanced screen handling.         *)
  12.  
  13. CONST ScreenSizeX = 80;
  14.       ScreenSizeY = 25;
  15.  
  16. VAR   CurWindow   : RECORD
  17.                        X1, Y1, X2, Y2,
  18.                        Attribute       : CARDINAL;
  19.                     END;
  20.  
  21. PROCEDURE ClearScreen();              (* Clear entire screen              *)
  22. PROCEDURE ClearEOL();                 (* Clear from cursor to end of line *)
  23. PROCEDURE GetVidMode() : CARDINAL;    (* Returns current video mode       *)
  24. PROCEDURE GetVidCh() : CARDINAL;      (* Returns char+attr at current X,Y *)
  25. PROCEDURE GotoXY (X,Y : CARDINAL);    (* Place cursor at location X,Y     *)
  26. PROCEDURE Highlight();                (* Turns highlighting on            *)
  27. PROCEDURE Inverse();                  (* Turns inverse video on           *)
  28. PROCEDURE KeyPressed() : BOOLEAN;     (* True if a key has been pressed   *)
  29. PROCEDURE Normal();                   (* Sets Video back to Normal        *)
  30. PROCEDURE PutChar (Ch:CHAR;Num:CARDINAL); (* Puts num chars at X,Y        *)
  31. PROCEDURE PutVidCh(ChAttr:CARDINAL);  (* Put char+attr at current X,Y     *)
  32. PROCEDURE Read(VAR Ch : CHAR);        (* Read a character from the kbd    *)
  33. PROCEDURE ScrollDown(Lines:CARDINAL); (* Scroll screen down               *)
  34. PROCEDURE ScrollUp(Lines : CARDINAL); (* Scroll screen up                 *)
  35. PROCEDURE SetCursorSize(Top, Bottom : CARDINAL);
  36. PROCEDURE SetVidMode(Mode:CARDINAL);  (* Sets new video mode              *)
  37. PROCEDURE WhereX () : CARDINAL;       (* Returns current X pos of cursor  *)
  38. PROCEDURE WhereY () : CARDINAL;       (* Returns current Y pos of cursor  *)
  39. PROCEDURE Window(X1,Y1,X2,Y2:CARDINAL); (* Defines current window         *)
  40. PROCEDURE WriteChar (Ch : CHAR);      (* Write a char and bump cursor     *)
  41. PROCEDURE Write(Ch : CHAR);           (* Write a char in current window   *)
  42. PROCEDURE WriteLn();                  (* Advance cursor to next line col 1*)
  43. PROCEDURE WriteString(S:ARRAY OF CHAR); (* Write a string using Write     *)
  44. PROCEDURE StealWrite();               (* Redirs Writes to use above proc. *)
  45. PROCEDURE ReturnWrite();              (* Returns writes to previous Write *)
  46. END Console.
  47.  
  48.